package com.example.demo.fallback;

import lombok.extern.slf4j.Slf4j;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;

@Component
@Slf4j
public class StorageServiceFallbackFactory implements FallbackFactory<StorageServiceFallback> {
    @Override
    public StorageServiceFallback create(Throwable throwable) {
        log.error("enter storageServiceFallback");
        StorageServiceFallback storageServiceFallback = new StorageServiceFallback(throwable);
        return storageServiceFallback;
    }
}
